﻿@*@model IEnumerable<SimpleScrum.Core.Entities.Project>
@{
    ViewBag.Title = "All Projects";
}
<div class="breadcrumbs" id="breadcrumbs">
    <ul class="breadcrumb">
        <li>
            <i class="icon-home home-icon"></i>
            <a href="@Url.Action("Index","DashBoard")">Home</a>
            <span class="divider">
                <i class="icon-angle-right arrow-icon"></i>
            </span>
        </li>
        <li class="active">Projects</li>
    </ul>
    <div class="nav-search pull-right">
        <a class="btn btn-small btn-success" href="@Url.Action("New","Project")">
            <i class="icon-plus-sign-alt"></i> New Project
        </a>
    </div>
</div>
<div class="page-content">
    <div class="page-header position-relative">
        <h1>@ViewBag.Title<small><i class="icon-double-angle-right"></i>@ViewBag.Message</small></h1>
    </div><!--/.page-header-->
    <div class="row-fluid">
        <div class="table-header">Results for "Latest Registered Projects"</div>
        <table id="sample-table-2" class="table table-striped table-bordered table-hover">
            <thead>
                <tr>
                    <th class="center"><label><input type="checkbox" /><span class="lbl"></span></label></th>
                    <th>Name</th>
                    <th>Description</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr>
                        <td class="center"><label><input type="checkbox" /><span class="lbl"></span></label></td>
                        <td>@Html.ActionLink(item.Name, "Details", new {   id=item.Id   })</td>
                        <td>@Html.DisplayFor(modelItem => item.Description)</td>
                        <td class="td-actions">
                            <div class="hidden-phone visible-desktop action-buttons">
                                <a class="blue" href="@Url.Action("Details", "Project", new {id = item.Id})">
                                    <i class="icon-zoom-in bigger-130"></i>
                                </a>
                                <a class="green" href="@Url.Action("Edit", "Project", new {id = item.Id})">
                                    <i class="icon-pencil bigger-130"></i>
                                </a>
                                <a class="red" href="@Url.Action("Delete", "Project", new {id = item.Id})">
                                    <i class="icon-trash bigger-130"></i>
                                </a>
                            </div>
                            <div class="hidden-desktop visible-phone">
                                <div class="inline position-relative">
                                    <button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
                                        <i class="icon-caret-down icon-only bigger-120"></i>
                                    </button>
                                    <ul class="dropdown-menu dropdown-icon-only dropdown-yellow pull-right dropdown-caret dropdown-close">
                                        <li>
                                            <a href="@Url.Action("Details", "Project", new {id = item.Id})" class="tooltip-info" data-rel="tooltip" title="View">
                                                <span class="blue"><i class="icon-zoom-in bigger-120"></i></span>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="@Url.Action("Edit", "Project", new {id = item.Id})" class="tooltip-success" data-rel="tooltip" title="Edit">
                                                <span class="green"><i class="icon-edit bigger-120"></i></span>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="@Url.Action("Delete", "Project", new {id = item.Id})" class="tooltip-error" data-rel="tooltip" title="Delete">
                                                <span class="red"><i class="icon-trash bigger-120"></i></span>
                                            </a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>

@section scripts {
    <script src="~/Content/Customize/js/jquery.dataTables.min.js"></script>
    <script src="~/Content/Customize/js/jquery.dataTables.bootstrap.js"></script>
}
@section scriptsText {
    <script type="text/javascript">
        $(function () {
            var oTable1 = $('#sample-table-2').dataTable({
                "aoColumns": [
                    { "bSortable": false },
                    null, null, null, null, null,
                    { "bSortable": false }
                ]
            });


            $('table th input:checkbox').on('click', function () {
                var that = this;
                $(this).closest('table').find('tr > td:first-child input:checkbox')
                    .each(function () {
                        this.checked = that.checked;
                        $(this).closest('tr').toggleClass('selected');
                    });

            });


            $('[data-rel="tooltip"]').tooltip({ placement: tooltip_placement });
            function tooltip_placement(context, source) {
                var $source = $(source);
                var $parent = $source.closest('table');
                var off1 = $parent.offset();
                var w1 = $parent.width();

                var off2 = $source.offset();
                var w2 = $source.width();

                if (parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2)) return 'right';
                return 'left';
            }
        })
    </script>
}*@

@{
    ViewBag.Title = "List";
}

<link href="~/Content/angularjs/ng-grid/ng-grid.min.css" rel="stylesheet" />
<style type="text/css">
    .gridStyle
    {
        width: 100%;
        height: 456px;
    }
</style>
}
<script src="~/Scripts/jquery-2.0.1.min.js"></script>

    <script src="~/Content/angularjs/ng-grid/ng-grid-2.0.7.min.js"></script>
<script src="~/Content/angularjs/core/angular.min.js"></script>
<script src="~/Content/angularjs/ui/ui-bootstrap-tpls-0.5.0.min.js"></script>
<script src="~/Scripts/ProjectController.js"></script>



<div ng-app="myApp" ng-controller="SettingsController" ng-init="Init('@VirtualPathUtility.ToAbsolute("~/WebApi/Scrum/Project/")','@ViewBag.org')">

    <div class="gridStyle" ng-grid="gridOptions">
    </div>
    <div>{{1+2}}</div>

</div>

